package com.example.supernote.data.network.config

import kotlinx.serialization.Serializable
import java.util.UUID


class TranslateTextRequestBody(
    private val from: String = "auto",
    private val target: String,
    private val translateText: String,
    private val requestId: String
) {
    fun getMap(): Map<String, String> {
        return mapOf (
            "from" to from,
            "to" to target,
            "text" to translateText,
            "app" to "test",
            "requestId" to requestId
        )
    }
}

@Serializable
data class TranslateTextResponse(
    val code: Int = -1,
    val data: Map<String, String> = mapOf(
        "text" to "",
        "from" to "",
        "to" to "",
        "translation" to ""
    ),
    val msg: String = "网络错误，请重试",
    val requestId: String = "uuid"
)